home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / vc / pro15 / sample.c < prev    next >
C/C++ Source or Header  |  1993-06-03  |  2KB  |  77 lines

  1. /* (c) 1993 LumiNet Publishing Corporation                        */
  2. /*          All rights reserved                                   */
  3.  
  4. #include <stdio.h>        /* Include definition of NULL */
  5. #include <stdlib.h>
  6. #include <dos.h>        /* Include prototypes for getvect() & setvect() */
  7. #include <process.h>    /* Include prototypes for spawn functions */
  8. #include <conio.h>
  9. #include <fcntl.h>        /* Include constants for low-level I/O */
  10. #include <errno.h>        /* Include error constants */
  11. #include <bios.h>
  12. #include <direct.h>
  13. #include <string.h>
  14. #include "LPCTL1.h"
  15.  
  16. main(int argc, char *argv[])
  17. {
  18. char junkie[1024];
  19. int    a;
  20. char    *auto_fig = "auto.wpg";
  21. struct figure FIG;
  22.  
  23. if(argc >1)
  24.      wpopen(argv[1]);
  25.      else
  26.      {
  27.      printf("\nusage sample <filename>");
  28.      exit(1);
  29.      }
  30. wphrtn( 1 );
  31.  
  32. wpfig( auto_fig, 0, 0, 0, 2400, 2400 );
  33. wphpage();
  34.  
  35. for(a=1;a<3;a++)
  36.     {
  37.     wphpage();
  38.     wphrtn(1);
  39.     wpcntr();
  40.     wpadd("THIS IS THE CENTERED HEADING OF THE PAGE");
  41.     wphrtn(1);
  42.     wpcntr();
  43.     itoa(a,junkie,10);
  44.     wpadd("->  ");
  45.     wpadd(junkie);
  46.     wpadd(" <-");
  47.     wphrtn(1);
  48.     }
  49. wphpage();
  50. wpcolmns();
  51. wpclmon();
  52. wpadd(" colummed page");
  53. wpclmoff();
  54.  
  55. for(a=1;a<3;a++)
  56.     {
  57.     wphpage();
  58.     wphrtn(1);
  59.     wpcntr();
  60.     wpfont(1);        /* changed font */
  61.     wpadd("THIS IS THE CENTERED HEADING OF THE PAGE");
  62.     wphrtn(1);
  63.     wpcntr();
  64.     itoa(a,junkie,10);
  65.     wpadd("->  ");
  66.     wpadd(junkie);
  67.     wpadd(" <-");
  68.     wphrtn(1);
  69.     }
  70.  
  71. wphpage();
  72. wpadd(" non page");
  73.  
  74. wpclose();
  75. exit(0);
  76. }
  77.